diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index ca083b4..fad9770 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -137,7 +137,7 @@
 			continue;
 		/* Check for the name or the sequence number to match */
 		if (strcmp(it->name, devname) == 0 ||
-		    (endp > startp && it->seq == seq))
+		    (endp > startp && dev_seq(it) == seq))
 			return it;
 	}
 
@@ -189,7 +189,7 @@
 int eth_get_dev_index(void)
 {
 	if (eth_get_dev())
-		return eth_get_dev()->seq;
+		return dev_seq(eth_get_dev());
 	return -1;
 }
 
@@ -202,7 +202,7 @@
 		return -EINVAL;
 
 	/* seq is valid since the device is active */
-	if (eth_get_ops(dev)->write_hwaddr && !eth_mac_skip(dev->seq)) {
+	if (eth_get_ops(dev)->write_hwaddr && !eth_mac_skip(dev_seq(dev))) {
 		pdata = dev->plat;
 		if (!is_valid_ethaddr(pdata->enetaddr)) {
 			printf("\nError: %s address %pM illegal value\n",
@@ -434,11 +434,11 @@
 
 		bootstage_mark(BOOTSTAGE_ID_NET_ETH_INIT);
 		do {
-			if (dev->seq != -1) {
+			if (dev_seq(dev) != -1) {
 				if (num_devices)
 					printf(", ");
 
-				printf("eth%d: %s", dev->seq, dev->name);
+				printf("eth%d: %s", dev_seq(dev), dev->name);
 
 				if (ethprime && dev == prime_dev)
 					printf(" [PRIME]");
@@ -446,7 +446,7 @@
 
 			eth_write_hwaddr(dev);
 
-			if (dev->seq != -1)
+			if (dev_seq(dev) != -1)
 				num_devices++;
 			uclass_next_device_check(&dev);
 		} while (dev);
@@ -547,7 +547,7 @@
 			eth_get_ops(dev)->read_rom_hwaddr(dev);
 	}
 
-	eth_env_get_enetaddr_by_index("eth", dev->seq, env_enetaddr);
+	eth_env_get_enetaddr_by_index("eth", dev_seq(dev), env_enetaddr);
 	if (!is_zero_ethaddr(env_enetaddr)) {
 		if (!is_zero_ethaddr(pdata->enetaddr) &&
 		    memcmp(pdata->enetaddr, env_enetaddr, ARP_HLEN)) {
@@ -562,13 +562,14 @@
 		/* Override the ROM MAC address */
 		memcpy(pdata->enetaddr, env_enetaddr, ARP_HLEN);
 	} else if (is_valid_ethaddr(pdata->enetaddr)) {
-		eth_env_set_enetaddr_by_index("eth", dev->seq, pdata->enetaddr);
+		eth_env_set_enetaddr_by_index("eth", dev_seq(dev),
+					      pdata->enetaddr);
 	} else if (is_zero_ethaddr(pdata->enetaddr) ||
 		   !is_valid_ethaddr(pdata->enetaddr)) {
 #ifdef CONFIG_NET_RANDOM_ETHADDR
 		net_random_ethaddr(pdata->enetaddr);
 		printf("\nWarning: %s (eth%d) using random MAC address - %pM\n",
-		       dev->name, dev->seq, pdata->enetaddr);
+		       dev->name, dev_seq(dev), pdata->enetaddr);
 #else
 		printf("\nError: %s address not set.\n",
 		       dev->name);
